<template>
  <div>
    {{goodDetail}}
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'GoodDetail',
  computed: {
    ...mapState({
      allGoods: state => state.drugStore.allGoods
    }),
    goodDetail: function () {
      return this.allGoods.find(rec => (parseInt(rec.id) === parseInt(this.$route.params.id)))
    }
  },
  mounted () {
  }
}
</script>

<style scoped >
</style>
